'use client'

import React from 'react'

import MobileTable from './MoblieTable'
import NextTable, { NextTableProps } from './NextTable'

const Table = ({
  items,
  columns,
  renderCell,
  selectedKeys,
  setSelectedKeys
}: NextTableProps) => {
  return (
    <>
      <div className="sm:flex hidden my-6">
        <NextTable
          columns={columns}
          items={items}
          selectedKeys={selectedKeys}
          setSelectedKeys={setSelectedKeys}
          renderCell={renderCell}
        />
      </div>
      <div className="flex sm:hidden">
        <MobileTable columns={columns} items={items} renderCell={renderCell} />
      </div>
    </>
  )
}

export default Table
